package com.helwen.restaurantbooking.datalayer.entities;

// Generated Jul 26, 2013 12:03:22 AM by Hibernate Tools 3.4.0.CR1
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

/**
 * TblBooking generated by hbm2java
 */
@Entity
@Table(name = "tbl_booking", catalog = "restaurantbooking")
public class TblBooking implements java.io.Serializable {

    private Integer id;
    private TblTable tblTable;
    private String customerName;
    private String contact;
    private Date reservationDate;
    private Short reservationTime;
    private String staffName;
    private Short numberOfPack;
    private String remarks;
    private Short status;

    public TblBooking() {
    }

    public TblBooking(Integer id, TblTable tblTable, String customerName, String contact, Date reservationDate, Short reservationTime, String staffName, Short numberOfPack, String remarks, Short status) {
        this.id = id;
        this.tblTable = tblTable;
        this.customerName = customerName;
        this.contact = contact;
        this.reservationDate = reservationDate;
        this.reservationTime = reservationTime;
        this.staffName = staffName;
        this.numberOfPack = numberOfPack;
        this.remarks = remarks;
        this.status = status;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "table_number", nullable = false)
    @Cascade(CascadeType.SAVE_UPDATE)
    public TblTable getTblTable() {
        return this.tblTable;
    }

    public void setTblTable(TblTable tblTable) {
        this.tblTable = tblTable;
    }

    @Column(name = "customer_name", length = 45)
    public String getCustomerName() {
        return this.customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    @Column(name = "contact", length = 100)
    public String getContact() {
        return this.contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "reservation_date", nullable = false, length = 19)
    public Date getReservationDate() {
        return this.reservationDate;
    }

    public void setReservationDate(Date reservationDate) {
        this.reservationDate = reservationDate;
    }

    @Column(name = "reservation_time", nullable = false)
    public Short getReservationTime() {
        return this.reservationTime;
    }
    public void setReservationTime(Short reservationTime) {
        this.reservationTime = reservationTime;
    }

    @Column(name = "staff_name", length = 50, nullable = false)
    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    @Column(name = "number_of_pack", nullable = false)
    public Short getNumberOfPack() {
        return numberOfPack;
    }

    public void setNumberOfPack(Short numberOfPack) {
        this.numberOfPack = numberOfPack;
    }

    @Column(name = "remarks", length = 100)
    public String getRemarks() {
        return this.remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Column(name = "status",nullable = false)
    public Short getStatus() {
        return this.status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }
}
